Type.registerNamespace("Telerik.Web.UI.Scheduler.Rendering");
(function(){var a=60000;
var d=a*60;
var e=d*24;
var c=Telerik.Web.UI.Scheduler.DateTime;
var b=Telerik.Web.UI.Scheduler.Rendering;
b.Row=function(f){this._index=f;
this._parts=new Array();
};
b.Row.prototype={tryAdd:function(h){for(var f=0,g=this._parts.length;
f<g;
f++){if(this.partsOverlap(this._parts[f],h)){this.addToNextRow(h);
return;
}}this.addPart(h);
},partsOverlap:function(f,g){return(f.end>g.start&&f.start<g.end);
},addToNextRow:function(f){if(!this._nextRow){this._nextRow=new b.Row(this._index+1);
}this._nextRow.tryAdd(f);
},addPart:function(f){Array.insert(this._parts,this._parts.length,f);
f.rowIndex=this._index;
}};
b.HorizontalBlockCollection=function(){this._parts=new Array();
};
b.HorizontalBlockCollection.prototype={add:function(f){if(!this._firstRow){this._firstRow=new b.Row(0);
}this._firstRow.tryAdd(f);
Array.insert(this._parts,this._parts.length,f);
},remove:function(g){if(!this._firstRow){return;
}Array.remove(this._parts,g);
this._firstRow=new b.Row(0);
for(var f=0,h=this._parts.length;
f<h;
f++){this._firstRow.tryAdd(this._parts[f]);
}}};
b.HorizontalBlockCollection.registerClass("Telerik.Web.UI.Scheduler.Rendering.HorizontalBlockCollection");
})();
